Dynamic rules to optimize common information model queries

ABSTRACT

One or more processors apply rules to a first query to generate a modified query such that processing of the modified query is improved for a first set of processing conditions. One or more processors measure a degree of latency experienced during processing of the modified query under a second set of processing conditions. One or more processors generate other rules to be applied to queries based, at least in part, on the measured degree of latency.

BACKGROUND OF THE INVENTION

The present invention relates generally to the field of CommonInformation Model (CIM) systems, and more particularly to optimizing CIMquery processing.

CIM is an open standard that defines how managed elements in an ITenvironment are represented as a common set of objects and relationshipsbetween them. This is intended to allow consistent management of thesemanaged elements, independent of their manufacturer or provider. CIMallows multiple parties to exchange management information about managedelements and also allows those parties to actively control and managethose elements. By using a common model of information, managementsoftware can be written once and work with many implementations of thecommon model without complex and costly conversion operations or loss ofinformation.

There are a large number of CIM implementations on different computingplatforms that vary in data access and retrieval performance. Often,there is more than one CIM query or set of queries available to retrievea certain set of CIM data. The performance of those queries is oftenimplementation dependent. For example, a CIM query used to retrieve acertain CIM object on one computing platform (e.g. System p) may be lessefficient when used for another platform (e.g. System z). Furthermore,the CIM query performance is dependent on the number of CIM objects andaccess paths between those objects in the Common Information ModelObject Manager (CIMOM).

SUMMARY

Embodiments of the present invention provide a method, system, andprogram product for applying rules to queries. One or more processorsapply one or more first rules to a first query to generate a modifiedquery such that processing of the modified query is improved for a firstset of processing conditions. One or more processors measure a degree oflatency experienced during processing of the modified query under asecond set of processing conditions. One or more processors generate oneor more second rules based, at least in part, on the degree of latency.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a functional block diagram illustrating a Common InformationModel (CIM) environment, in accordance with an exemplary embodiment ofthe present invention.

FIG. 2 illustrates the CIM query optimizer that is configured tofunction with a proxy computing device, in accordance with an exemplaryembodiment of the present invention.

FIG. 3 illustrates a CIM query optimizer that is configured to functionas a plug-in for a CIM server, in accordance with an exemplaryembodiment of the present invention.

FIG. 4 illustrates a CIM query optimizer that is configured to functionas a plug-in for a CIM client, in accordance with an exemplaryembodiment of the present invention.

FIG. 5 is a flowchart depicting the operational processes of a queryoptimization program, on a computing device within the environment ofFIG. 1, in accordance with an exemplary embodiment of the presentinvention.

FIG. 6 is a flowchart depicting the operational processes of a dynamicrules program, on a computing device within the environment of FIG. 1,in accordance with an exemplary embodiment of the present invention.

FIG. 7 depicts a block diagram of components of a computing deviceexecuting a query optimization program and dynamic rules program, inaccordance with an exemplary embodiment of the present invention.

DETAILED DESCRIPTION

While there are known solutions to Common Information Model (CIM)queries, they are reliant on a known set of rules that do not change.Rules describe a set of methods to process the query. The inflexibilitythat results from these static rules can result in significant latencywhen a query is processed.

Embodiments of the present invention recognize that CIM queries can beimproved by dynamically adapting the CIM request such that a moreefficient access path is used. Embodiments of the present inventionrecognize that the following parameters can be used to select the moreefficient access path: Common Information Model Object Manager (CIMOM)implementation, platform, size of CIM model, vendor provided accessrules, and dynamically created access rules. Embodiments of the presentinvention recognize that dynamically created access rules can begenerated based on CIM usage heuristics and measurements.

The present invention will now be described in detail with reference tothe Figures.

FIG. 1 is a functional block diagram illustrating a Common InformationModel (CIM) environment, generally designated 100, in accordance withone embodiment of the present invention. CIM environment 100 includescomputing device 110, CIM client computing device 120 and CIM servercomputing device 130 connected over network 140. Computing device 110includes query optimization program 111, dynamic rules program 113,rules repository 115, and heuristic database and latency model (HDLM)117.

In various embodiments of the present invention, computing device 110,CIM client computing device 120 and CIM server computing device 130respectively are computing devices that can be a standalone device, aserver, a laptop computer, a tablet computer, a netbook computer, apersonal computer (PC), or a desktop computer. In another embodiment,computing device 110, CIM client computing device 120 and CIM servercomputing device 130 represent a computing system utilizing clusteredcomputers and components to act as a single pool of seamless resources.In general, computing device 110, CIM client computing device 120 andCIM server computing device 130 can be any computing device or acombination of devices with access to query optimization program 111,dynamic rules program 113, rules repository 115, and HDLM 117, and iscapable of executing query optimization program 111 and dynamic rulesprogram 113. Computing device 110, CIM client computing device 120 andCIM server computing device 130 may respectively include internal andexternal hardware components, as depicted and described in furtherdetail with respect to FIG. 7.

In this embodiment, query optimization program 111, dynamic rulesprogram 113, rules repository 115, and HDLM 117 are stored on computingdevice 110. However, in other embodiments, query optimization program111, dynamic rules program 113, rules repository 115, and HDLM 117 maybe stored externally and accessed through a communication network, suchas network 140. Network 140 can be, for example, a local area network(LAN), a wide area network (WAN) such as the Internet, or a combinationof the two, and may include wired, wireless, fiber optic or any otherconnection known in the art. In general, network 140 can be anycombination of connections and protocols that will supportcommunications between computing device 110, CIM client computing device120 and CIM server computing device 130, query optimization program 111,dynamic rules program 113, rules repository 115, and HDLM 117, inaccordance with a desired embodiment of the present invention.

In this embodiment, computing device 110 is a proxy computing devicethat facilitates query processing between CIM client computing device120 and CIM server computing device 130.

In this embodiment, query optimization program 111 receives queries fromCIM client computing device 120. Query optimization program 111 accessesrules repository 115 and uses those rules to modify the received queryto improve the efficiency of the processing of the query. In general,the more efficiently a query is processed, the faster a result for thatquery is produced. As such, query optimization program 111 modifiesqueries such that the time required to generate a result is reduced,hence improving the efficiency of the processing of the query. It is tobe understood that the use of the words “optimizer” and “optimization”in proper names herein refers to an ability to cause an improvement inCIM processing, which may not be absolutely optimal in allinterpretations or embodiments, since there is often a tradeoff for agiven improvement. For example, one parameter is optimized while anotherparameter is exacerbated. As such the names “query optimization program111” or “CIM query optimizer” are in reference to programs or programelements that have the ability to cause an improvement in at least oneaspect of the processing of CIM queries.

In this embodiment, dynamic rules program 113 accesses rules repository115 and modifies the rules stored therein using information included aspart of HDLM 117. The modified rules are then included as part of rulesrepository 115. Alternatively, dynamic rules program 113 can generatenew rules based, at least in part, on the information included as partof HDLM 117. The generated rules address various attributes and existingelements of the CIM such as CIMOM implementation, platforms included bythe CIM, size of the CIM model, and vendor provided access rules.

In this embodiment, rules repository 115 is a set of access rules thatare applied during the processing of a CIM query. These rules providefunctionality for the processing of CIM queries using many elementsincluded in the CIM (see the discussion of CIM schema below for furtherdetails). Rules repository 115 includes two types of access rules. Thefirst type of access rules are original rules that are static. Thesecond type of access rules are dynamic rules that can be adapted toconditions experienced during the processing of CIM requests. Dynamicrules are generated by dynamic rules program 113. Original rules are,usually, created by the developer or vendor of a CIM resource or object.The original rules can include rules that address the CIM InfrastructureSpecification, which defines the architecture and concepts of CIM. A CIMInfrastructure Specification typically includes a language by which theCIM schema (including any extension schema) is defined, and a method formapping CIM to other information models, such as Simple NetworkManagement Protocol (SNMP).

The original rules typically include rules that address the CIM schema.A CIM schema is a conceptual schema which defines the specific set ofobjects and relationships between objects that represent a common basefor the managed elements in an IT environment. The CIM Schema, ingeneral, includes the elements in an information technology (IT)environment. An IT environment is the application of computers andtelecommunications equipment, for example computer systems, operatingsystems, networks, middleware, services and storage, to store, retrieve,transmit and manipulate data. The CIM schema defines a common basis forrepresenting these managed elements. Since many managed elements haveproduct and vendor specific behavior, the CIM Schema is extensible inorder to allow the producers of these elements to represent therespective specific features of those elements together with the commonbase functionality defined in the CIM Schema.

In this embodiment, HDLM 117 includes data from a heuristic database anda latency model for the CIM. A heuristic function, or simply aheuristic, is a function that ranks alternatives in search algorithms ateach branching step based on available information to decide whichbranch to follow. For example, for shortest path problems, a heuristicis a function, h(n) defined on the nodes of a search tree, whichestimates the cost of the cheapest path from the starting node to thegoal node. In many IT scenarios, the cost of a path can be in terms oflatency of that path or an amount of resources required to use thatpath. Heuristics are used by informed search algorithms, such as greedybest-first search and A*, to choose the best node to explore. A greedybest-first search chooses the node that has the lowest value for theheuristic function. An A* search expands nodes that have the lowestvalue for g(n)+h(n), where g(n) is the (exact) cost of the path from theinitial state or starting point to the current node. If h(n) isadmissible, i.e., if h(n) never overestimates the costs of reaching thegoal, then A* will always find an optimal solution. In general, theheuristics included in HDLM 117 are configured for ranking pathways todetermine a pathway that provides the least latency for processing a CIMquery relative to the other ranked pathways.

In this embodiment, a latency model is a model that represents thedegree of latency of the various access pathways that can be or havebeen used to retrieve a result of a CIM query. The latency of a givenaccess pathway can be attributed to several factors, such as networkcongestion, network traffic, distance between computing systems, andcomputer storage capacities, etc. In general latency is the time takento process the query, which may include interruptions and delays in thecompletion of the processing.

FIGS. 2-4 are block diagrams illustrating possible arrangements of a CIMquery optimizer, a CIM client and a CIM server. A CIM query optimizerincludes some or all of query optimization program 111, dynamic rulesprogram 113, rules repository 115, and HDLM 117, in accordance with adesired embodiment of the present invention. The CIM query optimizer canbe, in some embodiments, configured to function with a proxy computingdevice, such as computing device 110 as shown in FIG. 1. The CIM clientcan be seen as representing a computing device that generates a CIMquery, such as CIM client computing device 120. The CIM server can beseen as representing a query processing computer that generates a resultfor a CIM query, such as CIM server computing device 130.

FIG. 2 illustrates a CIM query optimizer that is configured to functionwith a proxy computing device. In this configuration the CIM client andthe CIM server may be unaware that CIM query optimizer exists. In suchan embodiment, CIM query optimizer can intercept queries being issued bythe CIM client, and modify those queries using query optimizationprogram 111, dynamic rules program 113, rules repository 115, and HDLM117, in accordance with a desired embodiment of the present invention.The modified queries are then passed to the CIM server for processingand the result of the query processing is returned to the CIM client.Such a configuration may be optimal in a scenario where an existingsystem includes multiple CIM clients and the network performance canbenefit from further optimization. Such a configuration also requireslittle or no modification to the existing CIM client(s) and CIMserver(s), which can be useful where backward compatibility issuesexist.

FIG. 3 illustrates a CIM query optimizer that is configured to functionas a plug-in for a CIM server. Such an embodiment may be of benefit whencreating new CIM servers, as access performance can be improved. In suchembodiments, the CIM server receives queries from CIM client(s) andpasses them to the CIM query optimizer. In such an embodiment, CIM queryoptimizer modifies those queries using query optimization program 111,dynamic rules program 113, rules repository 115, and HDLM 117, inaccordance with a desired embodiment of the present invention. Themodified queries are then passed to the CIM server for processing andthe result of the query processing is returned to the CIM client.

FIG. 4 illustrates a CIM query optimizer that is configured to functionas a plug-in for a CIM client. Such an embodiment may be of benefit whenthere are new CIM clients. In such a scenario, access performance can beimproved using recently created or updated client-specific rules, as aspecific set of dynamically improved rules can be generated. In suchembodiments, the CIM client generate queries and pass them to the CIMquery optimizer. In such an embodiment, CIM query optimizer modifiesthose queries using query optimization program 111, dynamic rulesprogram 113, rules repository 115, and HDLM 117, in accordance with adesired embodiment of the present invention. The modified queries arethen passed to the CIM server for processing and the result of the queryprocessing is returned to the CIM client.

FIG. 5 is a flowchart, 500, depicting the operational processes of queryoptimization program 111, on computing device 110 within the environmentof FIG. 1, in accordance with an exemplary embodiment of the presentinvention.

In process 510, query optimization program 111 receives a requested CIMquery. In many instances, such a request is from a client, such as CIMclient computing device 120. In decision process 520, query optimizationprogram 111 determines whether a rules package exists that can beapplied to the CIM query. Query optimization program 111 accesses rulesrepository 115 and determines whether there are any rules, or sets ofrules, that can be applied or should be applied to the CIM query.

Rules that can be applied or should be applied to the query are rulesthat are needed to process the query or will optimize the processing ofthe CIM query. In general, certain rules need to be applied in order toprocess the query, as such these rules can be and should be applied.However, other rules are optional, i.e., they can be applied but theirapplication is optional, i.e., even though they could be applied,certain situations dictate that they should not be applied. Theseoptional rules are often only applied if their application will optimizethe processing of the CIM query. If query optimization program 111determines that a rules package that can be applied to the requested CIMquery does not exist (decision process 520, no branch), then queryoptimization program 111 proceeds to process 570. In general, if aparticular query has not been processed before, then there is a chancethat a rules package does not exist for that query. However, after aquery is processed, dynamic rules program 113 will have generated a setof rules that can be applied to future instances of that query, orqueries that are substantially related to that query, i.e., use some ofthe same pathways or include a request for some of the same data etc. Ifquery optimization program 111 determines that a rules package doesexist that can be applied to the requested CIM query (decision process520, yes branch), then query optimization program 111 proceeds todecision process 530.

In decision process 530, query optimization program 111 determineswhether the rules package has been applied to the requested CIM query,i.e., whether the rules package that should be applied has been appliedto the requested CIM query. It should be noted that, in some cases,there may be multiple rules packages that should be applied. In somesituations or embodiments, only certain rules packages should beapplied. For example, the rules packages are ranked and only the highestranked rules package that can be applied should be applied. In anotherexample, rules package A includes a rule that conflicts with a rule inrule package B and both rules packages can be applied. In such a casequery optimization program 111 would include logic, such as additionalrules included in rules repository 115, to determine which package is tobe applied. In general, query optimization program 111 compares thequery request to a set of one or more rules packages, included in rulesrepository 115, to determine whether the rules that can and should beapplied have been applied to the requested CIM query. If queryoptimization program 111 determines that the rules package, which may bemore than one rules package, has been applied to the requested CIM query(decision process 530, yes branch), then query optimization program 111proceeds to process 570. If query optimization program 111 determinesthat the rules package has not been applied to the requested CIM query(decision process 530, no branch), then query optimization program 111proceeds to process 540.

In process 540, query optimization program 111 retrieves an un-appliedrules package with the highest priority from rules repository 115. Queryoptimization program 111 accesses the heuristics included in HDLM 117and applies them to determine which un-applied rules package has thehighest priority. In general, the rules package that has the highestpriority is the one which will provide the lowest latency with the bestefficiency and will generate the result to the CIM query. The generationof a rules package that provides the lowest latency with the bestefficiency and will generate the result to the CIM query, i.e., therules that should be applied to the requested CIM query, is explained infurther detail in the discussion of FIG. 6.

In process 550, query optimization program 111 modifies the requestedCIM query with the retrieved un-applied rules package. Queryoptimization program 111 uses the retrieved rules package to modify therequested CIM query such that the processing of that CIM query isimproved, i.e., will be processed as quickly and as efficiently aspossible given the processing conditions, e.g., environmental factorsthat the heuristics are based on. In process 560, query optimizationprogram 111 marks the rules package as applied and then returns todecision process 530.

In process 570, query optimization program 111 sends the CIM query forprocessing by dynamic rules program 113 and for execution by CIM servercomputing device 130. In some cases, the CIM query was not modified,such as in cases in which no rules package exists that can be applied tothe requested query (decision process 520, no branch). In such asituation, the CIM query that is executed by a CIM server, such as CIMserver computing device 130, can be the same query that was received byquery optimization program 111. In other cases, the CIM query wasmodified using the rules included in rules repository 115. As such, theCIM query that is sent to be executed is not the same as that which wasreceived by query optimization program 111.

In process 580, query optimization program 111 returns the results ofthe executed query to the client, e.g., CIM server computing device 130returns the results of the executed query to query optimization program111, which passes them to CIM client computing device 120.

FIG. 6 is a flowchart, 600, depicting the operational processes ofdynamic rules program 113, on computing device 110 within theenvironment of FIG. 1, in accordance with an exemplary embodiment of thepresent invention.

In process 610, dynamic rules program 113 parses the requested CIM queryto identify an initial set of query processes, e.g., operational stepsor functions, that will, when executed, yield the result to the query.In process 620, dynamic rules program 113 determines which possiblepathways can be used to process the CIM query and generate the result,i.e., the answer to the query, based on the initial set of queryprocesses.

In process 630, dynamic rules program 113 analyzes a latency model toidentify an optimal pathway. Dynamic rules program 113 accesses andanalyzes the latency model(s) included as part of HDLM 117, and comparesthem to the possible pathways that can be used to process the CIM query.The analysis identifies the optimal pathway to be used to process theCIM query to generate the result.

In process 640, dynamic rules program 113 determines a new set of queryprocesses that follow the optimal path. In other words, dynamic rulesprogram 113 identifies a sequence of query processes that will satisfythe CIM query, as originally submitted, to generate the result and thatwill follow the optimal pathway to generate that result.

In process 650, dynamic rules program 113 passes the new set of queryprocesses to query optimization program 111 for execution by CIM servercomputer 130. In many instances, query optimization program 111 passesthe new set of query processes that follow the optimal path to a CIMserver, e.g., CIM server computing device 130, which then executes thenew set of query processes. Alternatively, dynamic rules program 113passes the new set of query processes to the CIM server.

In process 660, dynamic rules program 113 updates a set of dynamiclatency trees and generates new rules based on latencies that aremeasured during the execution of the new set of query processes. Thedynamic latency trees are included as part of HDLM 117 and are updatedbased on the results of the execution of the new set of query processes.This update includes actual, i.e., measured, latencies that wereexperienced during the execution of the new set of query processes. Thenew rules that are generated by dynamic rules program 113 are includedas part of rules repository 115. The new rules take into account theactual latencies that were experienced during the execution of the newset of query processes. In some cases, this results in the creation of arule that reinforces a previously existing rule. For example, anoriginal rule could specify the use of pathway Y. Based on the actuallatency, the new rule specifies the use of pathway Y followed by pathwayZ. In other cases, this results in the creation of a rule thatcontradicts a previously existing rule. For example, an original rulecould specify the use of pathway A. Based on the actual latency ofpathway A, if the use pathway B will likely result in a lower latency,then the new rule specifies the use of pathway B. In some embodiments,statistical analysis and a variety of thresholds are applied to generatethe new rules. This helps ensure that the new rules that are generatedhave the highest probability of being more efficient, i.e., having thelowest latency.

FIG. 7 depicts a block diagram of components of computing device 110executing a query optimization program and a dynamic rules program, inaccordance with an exemplary embodiment of the present invention. It isto be noted that FIG. 7 may also depict components of CIM clientcomputing device 120 and CIM server computing device 130, which,depending on the embodiment, may also be the computing device executingquery optimization program 111, in accordance with exemplary embodimentsof the present invention.

In this embodiment, FIG. 7 depicts a block diagram, 700, of componentsof computing device 110, in accordance with an illustrative embodimentof the present invention. It should be appreciated that FIG. 7 providesonly an illustration of one implementation and does not imply anylimitations with regard to the environments in which differentembodiments may be implemented. Many modifications to the depictedenvironment may be made.

Computing device 110 includes communications fabric 702, which providescommunications between computer processor(s) 704, memory 706, persistentstorage 708, communications unit 710, and input/output (I/O interface(s)712. Communications fabric 702 can be implemented with any architecturedesigned for passing data and/or control information between processors(such as microprocessors, communications and network processors, etc.),system memory, peripheral devices, and any other hardware componentswithin a system. For example, communications fabric 702 can beimplemented with one or more buses.

Memory 706 and persistent storage 708 are computer-readable storagemedia. In this embodiment, memory 706 includes random access memory(RAM) 714 and cache memory 716. In general, memory 706 can include anysuitable volatile or non-volatile computer-readable storage media.

Query optimization program 111, dynamic rules program 113, rulesrepository 115, and heuristic database and latency model (HDLM) 117 arestored in persistent storage 708 for execution and/or access by one ormore of the respective computer processors 704 via one or more memoriesof memory 706. In this embodiment, persistent storage 708 includes amagnetic hard disk drive. Alternatively, or in addition to a magnetichard disk drive, persistent storage 708 can include a solid state harddrive, a semiconductor storage device, read-only memory (ROM), erasableprogrammable read-only memory (EPROM), flash memory, or any othercomputer-readable storage media that is capable of storing programinstructions or digital information.

The media used by persistent storage 708 may also be removable. Forexample, a removable hard drive may be used for persistent storage 708.Other examples include optical and magnetic disks, thumb drives, andsmart cards that are inserted into a drive for transfer onto anothercomputer-readable storage medium that is also part of persistent storage708.

Communications unit 710, in these examples, provides for communicationswith other data processing systems or devices, including resources ofnetwork 140. In these examples, communications unit 710 includes one ormore network interface cards. Communications unit 710 may providecommunications through the use of either or both physical and wirelesscommunications links. Query optimization program 111, dynamic rulesprogram 113, rules repository 115, and HDLM 117 may be downloaded topersistent storage 708 through communications unit 710.

I/O interface(s) 712 allows for input and output of data with otherdevices that may be connected to computing device 110. For example, I/Ointerface 712 may provide a connection to external devices 718 such as akeyboard, keypad, a touch screen, and/or some other suitable inputdevice. External devices 718 can also include portable computer-readablestorage media such as, for example, thumb drives, portable optical ormagnetic disks, and memory cards. Software and data used to practiceembodiments of the present invention, e.g., query optimization program111, dynamic rules program 113, rules repository 115, and HDLM 117, canbe stored on such portable computer-readable storage media and can beloaded onto persistent storage 708 via I/O interface(s) 712. I/Ointerface(s) 712 also connect to a display 720.

Display 720 provides a mechanism to display data to a user and may be,for example, a computer monitor, or a television screen.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The programs described herein are identified based upon the applicationfor which they are implemented in a specific embodiment of theinvention. However, it should be appreciated that any particular programnomenclature herein is used merely for convenience, and thus theinvention should not be limited to use solely in any specificapplication identified and/or implied by such nomenclature.

It is to be noted that the term(s) “Smalltalk” and the like may besubject to trademark rights in various jurisdictions throughout theworld and are used here only in reference to the products or servicesproperly denominated by the marks to the extent that such trademarkrights may exist.

What is claimed is:
 1. A method of applying rules to queries, the methodcomprising: applying, by the one or more processors, one or more firstrules to a first query to generate a modified query such that processingof the modified query is improved for a first set of processingconditions; measuring, by the one or more processors, a degree oflatency experienced during processing of the modified query under asecond set of processing conditions; and generating, by the one or moreprocessors, one or more second rules based, at least in part, on thedegree of latency.
 2. The method of claim 1, the method furthercomprising: identifying, by the one or more processors, a second query;and applying, by the one or more processors, the one or more secondrules to the second query such that processing of the second query isimproved for the second set of processing conditions.
 3. The method ofclaim 1, the method further comprising: determining, by one or moreprocessors, whether one or both of the first rules and the second rulesis to be applied to a third query for data residing in a hierarchicalstructure; responsive to a determination that one or both of the firstrules and the second rules are to be applied to the third query,determining, by the one or more processors, whether one or both of thefirst rules and the second rules have been applied to the third query;and responsive to a determination that one or both of the first rulesand the second rules have not been applied to the third query, applying,by the one or more processors, one or both of the first rules and thesecond rules to modify the third query such that the third query isimproved for a third set of processing conditions.
 4. The method ofclaim 1, the method further comprising: parsing, by the one or moreprocessors, a received query to identify a first set of query processesthat will, when executed, yield the result to the query; anddetermining, by the one or more processors, which possible pathways canbe used to process the received query and generate a result based, atleast in part, on the first set of query processes.
 5. The method ofclaim 4, the method further comprising: analyzing, by the one or moreprocessors, a latency model to determine which pathways can be used toprocess the received query and generate the result, wherein the analysisidentifies a specific pathway to be used to process the received queryand to generate the result, and wherein the specific pathway is based,at least in part, on a predicted degree of latency produced by theanalysis of the latency model.
 6. The method of claim 5, the methodfurther comprising: determining, by the one or more processors, a secondset of query processes that follow the specific pathway and willgenerate, when executed, the same result as the first set of queryprocesses.
 7. The method of claim 1, the method further comprising:updating, by the one or more processors, a set of latency trees thatrepresent latencies measured during execution of a third set of queryprocesses; and generating, by the one or more processors, one or moremodified rules based, at least in part, on the updated set of latencytrees.
 8. A computer program product for applying rules to queries, thecomputer program product comprising: one or more computer-readablestorage media and program instructions stored on the one or morecomputer-readable storage media, the program instructions to perform amethod, the method comprising: applying, by the one or more processors,one or more first rules to a first query to generate a modified querysuch that processing of the modified query is improved for a first setof processing conditions; measuring, by the one or more processors, adegree of latency experienced during processing of the modified queryunder a second set of processing conditions; and generating, by the oneor more processors, one or more second rules based, at least in part, onthe degree of latency.
 9. The computer program product of claim 8, themethod further comprising: identifying, by the one or more processors, asecond query; and applying, by the one or more processors, the one ormore second rules to the second query such that processing of the secondquery is improved for the second set of processing conditions.
 10. Thecomputer program product of claim 8, the method further comprising:determining, by one or more processors, whether one or both of the firstrules and the second rules is to be applied to a third query for dataresiding in a hierarchical structure; responsive to a determination thatone or both of the first rules and the second rules are to be applied tothe third query, determining, by the one or more processors, whether oneor both of the first rules and the second rules have been applied to thethird query; and responsive to a determination that one or both of thefirst rules and the second rules have not been applied to the thirdquery, applying, by the one or more processors, one or both of the firstrules and the second rules to modify the third query such that the thirdquery is improved for a third set of processing conditions.
 11. Thecomputer program product of claim 8, the method further comprising:parsing, by the one or more processors, a received query to identify afirst set of query processes that will, when executed, yield the resultto the query; and determining, by the one or more processors, whichpossible pathways can be used to process the received query and generatea result based, at least in part, on the first set of query processes.12. The computer program product of claim 11, the method furthercomprising: analyzing, by the one or more processors, a latency model todetermine which pathways can be used to process the received query andgenerate the result, wherein the analysis identifies a specific pathwayto be used to process the received query and to generate the result, andwherein the specific pathway is based, at least in part, on a predicteddegree of latency produced by the analysis of the latency model.
 13. Thecomputer program product of claim 12, the method further comprising:determining, by the one or more processors, a second set of queryprocesses that follow the specific pathway and will generate, whenexecuted, the same result as the first set of query processes.
 14. Thecomputer program product of claim 8, the method further comprising:updating, by the one or more processors, a set of latency trees thatrepresent latencies measured during execution of a third set of queryprocesses; and generating, by the one or more processors, one or moremodified rules based, at least in part, on the updated set of latencytrees.
 15. A computer system for applying rules to queries, the computersystem comprising: a memory; and a processor in communication with thememory, wherein the computer system is configured to perform a method,said method comprising: applying, by the one or more processors, one ormore first rules to a first query to generate a modified query such thatprocessing of the modified query is improved for a first set ofprocessing conditions; measuring, by the one or more processors, adegree of latency experienced during processing of the modified queryunder a second set of processing conditions; and generating, by the oneor more processors, one or more second rules based, at least in part, onthe degree of latency.
 16. The computer system of claim 15, the methodfurther comprising: identifying, by the one or more processors, a secondquery; and applying, by the one or more processors, the one or moresecond rules to the second query such that processing of the secondquery is improved for the second set of processing conditions.
 17. Thecomputer system of claim 15, the method further comprising: parsing, bythe one or more processors, a received query to identify a first set ofquery processes that will, when executed, yield the result to the query;and determining, by the one or more processors, which possible pathwayscan be used to process the received query and generate a result based,at least in part, on the first set of query processes.
 18. The computersystem of claim 17, the method further comprising: analyzing, by the oneor more processors, a latency model to determine which pathways can beused to process the received query and generate the result, wherein theanalysis identifies a specific pathway to be used to process thereceived query and to generate the result, and wherein the specificpathway is based, at least in part, on a predicted degree of latencyproduced by the analysis of the latency model.
 19. The method of claim18, the method further comprising: determining, by the one or moreprocessors, a second set of query processes that follow the specificpathway and will generate, when executed, the same result as the firstset of query processes.
 20. The computer system of claim 1, the methodfurther comprising: updating, by the one or more processors, a set oflatency trees that represent latencies measured during execution of athird set of query processes; and generating, by the one or moreprocessors, one or more modified rules based, at least in part, on theupdated set of latency trees.